package com.ruoyi.buildings.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.buildings.mapper.SysBuildingsMapper;
import com.ruoyi.buildings.domain.SysBuildings;
import com.ruoyi.buildings.service.ISysBuildingsService;

/**
 * 楼栋表Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-10-14
 */
@Service
public class SysBuildingsServiceImpl implements ISysBuildingsService 
{
    @Autowired
    private SysBuildingsMapper sysBuildingsMapper;

    /**
     * 查询楼栋表
     * 
     * @param id 楼栋表主键
     * @return 楼栋表
     */
    @Override
    public SysBuildings selectSysBuildingsById(Integer id)
    {
        return sysBuildingsMapper.selectSysBuildingsById(id);
    }

    /**
     * 查询楼栋表列表
     * 
     * @param sysBuildings 楼栋表
     * @return 楼栋表
     */
    @Override
    public List<SysBuildings> selectSysBuildingsList(SysBuildings sysBuildings)
    {
        return sysBuildingsMapper.selectSysBuildingsList(sysBuildings);
    }

    /**
     * 新增楼栋表
     * 
     * @param sysBuildings 楼栋表
     * @return 结果
     */
    @Override
    public int insertSysBuildings(SysBuildings sysBuildings)
    {
        return sysBuildingsMapper.insertSysBuildings(sysBuildings);
    }

    /**
     * 修改楼栋表
     * 
     * @param sysBuildings 楼栋表
     * @return 结果
     */
    @Override
    public int updateSysBuildings(SysBuildings sysBuildings)
    {
        return sysBuildingsMapper.updateSysBuildings(sysBuildings);
    }

    /**
     * 批量删除楼栋表
     * 
     * @param ids 需要删除的楼栋表主键
     * @return 结果
     */
    @Override
    public int deleteSysBuildingsByIds(Integer[] ids)
    {
        return sysBuildingsMapper.deleteSysBuildingsByIds(ids);
    }

    /**
     * 删除楼栋表信息
     * 
     * @param id 楼栋表主键
     * @return 结果
     */
    @Override
    public int deleteSysBuildingsById(Integer id)
    {
        return sysBuildingsMapper.deleteSysBuildingsById(id);
    }

    @Override
    public SysBuildings selectNameByBuilding(String buildings) {
        return sysBuildingsMapper.selectNameByBuilding(buildings);
    }
}
